package cn.tedu.redis.demo.warmup;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 预热的类 本身是容器的bean对象,在生命周期末尾 调用ApplicationRunner
 * 的接口实现
 */
@Component
public class MyWarmup implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("我的预热实现类 被调用了run方法");
    }
}
